package org.hnsd.train.pattern.strategy;

/**
 * @author youqd
 * @tag.date 2023-11-01 16:28
 **/
public class Context {
    private Strategy strategy;

    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    public void algorithm(){
        strategy.algorithm();
    }

    public static void main(String[] args) {
        new Context(new ConcreteStrategy2()).algorithm();
    }
}
